<div class="main fly-user-main layui-clear">
    <ul class="layui-nav layui-nav-tree layui-inline" lay-filter="user">
        <li class="layui-nav-item"><a href="{:U('home/u/index',array('id'=>$_SESSION['id']))}"> <i class="layui-icon"></i> 我的主页 </a></li>
        <li class="layui-nav-item layui-this"><a href="{:U('home/users/index')}"> <i class="layui-icon"></i> 用户中心 </a></li>
        <li class="layui-nav-item "><a href="{:U('home/set/index')}"> <i class="layui-icon"></i> 基本设置
        </a></li>
        <li class="layui-nav-item "><a href="{:U('home/msg/index')}"> <i class="layui-icon"></i> 我的消息 </a>
        </li>
        <!-- <li class="layui-nav-item "><a href="{:U('home/vip/index')}"> <i class="layui-icon"></i> 会员授权 </a></li> -->
        <span class="layui-nav-bar" style="top: 77.5px; height: 0px; opacity: 0;"></span></ul>
    <div class="site-tree-mobile layui-hide"><i class="layui-icon"></i></div>
    <div class="site-mobile-shade"></div>
    <div class="fly-panel fly-panel-user" pad20="">
        <div class="layui-tab layui-tab-brief" lay-filter="user" id="LAY_uc">
          <?php if ($email['estate']==0) { ?>
            <div class="fly-msg"> 您的邮箱尚未验证，这比较影响您的帐号安全，<a href="http://fly.layui.com/user/activate/">立即去激活？</a></div>
          <?php } ?>
            
            <ul class="layui-tab-title" id="LAY_mine">
                <li data-type="mine-jie" lay-id="index" class="layui-this">我发的帖（<span><?php echo $w_num ?></span>）</li>
                <li data-type="collection" data-url="/collection/find/" lay-id="collection" class="">
                    我收藏的帖（<span><?php echo count($store) ?></span>）
                </li>
            </ul>
            <div class="layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
                <div class="layui-tab-item  layui-show">
                    <ul class="mine-view jie-row">
                        <?php  foreach ($mywen as $k => $v) { ?>
                            <li>
                              <?php if ($v['status']==1) { ?>
                                <span class="jie-status jie-status-ok">已解决</span>
                              <?php } ?>
                              <a class="jie-title" href="{:U('Home/contg/index',array('id'=>$v['id']))}" target="_blank"><?php echo $v['title'] ?>
                              </a>
                              <i><?php echo CTS($v['create_time']) ?></i>
                              <?php if ($v['status']==0) { ?>
                                <a class="mine-edit" href="{:U('home/wen/editquestion',array('id'=>$v['id']))}">编辑</a>
                              <?php } ?>
                              
                            <em><?php echo $v['view_num'] ?>阅/<?php echo $v['answer_num'] ?>答</em></li>
                       <?php } ?>

                    </ul>
                    <div id="LAY_page">
                      <?php echo $page ?>
                    </div>

                    <style type="text/css">
                        #LAY_page a{margin-left: 10px;text-align: center;  width: 36px; border: 1px solid #009E94; display: inline-block;}
                        .current {margin-left: 10px;text-align: center;  width: 36px; border: 1px solid #009E94; display: inline-block; background:#009E94; color: #fff }
                    </style>

          



                </div>
                <div class="layui-tab-item">
                    <ul class="mine-view jie-row">


                        <?php foreach ($store as $row) { ?>
                        <li>
                            <a class="jie-title" href="{:U('home/contg/index',array('id'=>$row['id'])) }" target="_blank"><?php echo $row['title'] ?></a>
                            <i><?php echo CTS($row['create_time']) ?></i>
                        </li>
                        <?php } ?>
                        

                    </ul>
                    <div id="LAY_page">
                      <?php echo $cpage ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
layui.use('element', function(){
  var $ = layui.jquery
  ,element = layui.element(); //Tab的切换功能，切换事件监听等，需要依赖element模块
  
  //触发事件
  var active = {

    tabChange: function(){
      //切换到指定Tab项
      element.tabChange('demo', '22'); //切换到：用户管理
    }
  };
  
  $('.site-demo-active').on('click', function(){
    var othis = $(this), type = othis.data('type');
    active[type] ? active[type].call(this, othis) : '';
  });

  
});
</script>